package com.ssy.system.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author ssy
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_register")
public class Register implements Serializable {
    private static final long serialVersionUID = -7201117915476628287L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal price;

    private Integer state;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
